home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Select (Limited Edition)
/
Computer Select.iso
/
pcmag
/
v11n07
/
swtest.pas
< prev
Wrap
Pascal/Delphi Source File
|
1992-01-05
|
773b
|
27 lines
PROGRAM SWriTest;
USES SWrite, WinProcs, WinTypes;
CONST S : PChar = 'Sin(Pi/2)=';
VAR
TmpOut : Text;
R : Real;
x : ARRAY[0..64] OF Char;
C : Char;
BEGIN
AssignWrite(Output, 64, FALSE); {a buffer size of 64 is set here}
ReWrite(Output);
Write('Hello World! ');
MessageBox(0, GetLastWritten, 'start test', mb_Ok);
R := Pi/2;
WriteLn('Pi is ', Pi:3:4, S:12, Sin(R):2:2);
MessageBox(0, GetLastWritten, 'swrite test', mb_Ok);
Close(Output);
AssignWrite(Output, 512, TRUE); {Accumulate Writes}
ReWrite(Output);
FillChar(X,SizeOf(X),'x');
X[64] := #0;
FOR C := '1' to '6' DO
WriteLn(C,X);
WriteLn('Accumulated seven lines');
MessageBox(0, GetLastWrittenC(Output), 'Accumulate Test', mb_Ok);
END.